]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popup-menu: Use correct St.Align values
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 19 Sep 2011 19:56:49 +0000 (21:56 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 19 Sep 2011 20:06:31 +0000 (22:06 +0200)
It is not St.Align.CENTER, but St.Align.MIDDLE - in contrast to
St.TextAlign, where it *is* CENTER. Yay consistency!

js/ui/popupMenu.js

index 490228a1ffde4e4d2d57e99cef2695afb0137b21..ac831e23da62b9f24d1ef7b34e583f5c6f8a8e76 100644 (file)
@@ -313,7 +313,7 @@ PopupBaseMenuItem.prototype = {
                 if (child.expand) {
                     childBox.x1 = x;
                     childBox.x2 = x + availWidth;
-                } else if (child.align === St.Align.CENTER) {
+                } else if (child.align === St.Align.MIDDLE) {
                     childBox.x1 = x + Math.round(extraWidth / 2);
                     childBox.x2 = childBox.x1 + naturalWidth;
                 } else if (child.align === St.Align.END) {
@@ -327,7 +327,7 @@ PopupBaseMenuItem.prototype = {
                 if (child.expand) {
                     childBox.x1 = x - availWidth;
                     childBox.x2 = x;
-                } else if (child.align === St.Align.CENTER) {
+                } else if (child.align === St.Align.MIDDLE) {
                     childBox.x1 = x - Math.round(extraWidth / 2);
                     childBox.x2 = childBox.x1 + naturalWidth;
                 } else if (child.align === St.Align.END) {